<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <script src="../js/jquery-1.9.1.min.js"></script>
    <link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/login.css">
    <script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <script src="../js/login.js"></script>
    <title>绘梦之约</title>
</head>
<style>
    #reapeat_icon {
        cursor: pointer;
        color: rgb(255, 140, 60);
        top: 10px;
        top: 4px;
        left: -7px;
    }
</style>

<body>
<div id="mid">
    <div class="container mycontent text-left">
        <!--透明层 -->
        <div class="regDiv">
            <h4>登录</h4>
            <hr/>
            <!--表单开始-->
            <form class="form-horizontal" role="form" id="form-reg">
                <!--用户名-->
                <div class="form-group">
                    <div class="col-md-8">
                        <input type="text" class="form-control input_class" placeholder="请输入用户名" name="username"
                               id="username">
                    </div>
                    <label class="col-md-3 control-label err" id="usernameERR" style="text-align: left"></label>
                </div>
                <!--密码-->
                <div class="form-group">
                    <div class="col-md-8">
                        <input type="password" class="form-control input_class" placeholder="请输入密码" name="password"
                               id="password">
                    </div>
                    <label class="col-md-3 control-label err" id="passwordERR" style="text-align: left"> </label>
                </div>
                <div class="form-group">
                    <div class="col-md-8">
                        <input type="text" class="form-control input_class" placeholder="请输入图片中的的验证码"
                               name="verifiedcode" id="verifiedcode">
                    </div>
                    <div id="info">
                        <span class="glyphicon glyphicon-repeat" id="reapeat_icon"></span>
                        <img id="verifiedcodeimg" src="/blog/public/getverifiedcode" alt="">
                    </div>
                </div>
                <!--提交按钮-->
                <div class="form-group">
                    <label class="col-md-3 control-label"></label>
                    <div class="col-md-8">
                        <input class="btn btn-primary" type="button" value="立即登录" id="submit"
                               onkeydown="fownfn()"/> <span class="pull-right"><small>没有账号？</small><a
                            href="index.html">注册</a></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script>
    $("#reapeat_icon").off().on('click', function () {
        $("#verifiedcodeimg").attr("src",
            "/blog/public/getverifiedcode?" + Math.random());
    });
    window.onkeypress = function (e) {
        var code = e.keyCode;
        if (code == 13) {
            $("#submit").click();
        }
    }
</script>

</html>